﻿using Microsoft.AspNetCore.Mvc;
using mozhi.smarterp.Finance.Files;
using System.Threading.Tasks;
using Volo.Abp;

namespace mozhi.smarterp.Finance.Ieps
{
    [RemoteService]
    [Route("api/v1/leps/export")]
    public class ExportController : BaseController
    {
        private IExportAppService _exportAppService;

        public ExportController(IExportAppService exportAppService)
        {
            _exportAppService = exportAppService;
        }

        [HttpGet]
        public async Task<FileDto> DownloadFileAsync(ExportQueryDto query)
        {
            var result = await _exportAppService.ExportAsync(query);

            return result;
        }
    }
}
